// 基于template/src/views/{{appModules}}/{{pages@DEGRIDVIEW}}/{{spinalCase page.codeName}}-model.ts.hbs生成
import { IGridViewModel } from "@/core/interface/view/model";

function getModel(): IGridViewModel {
    return {
        caption: "表格内置功能",
        title: "表格内置功能",
        capPSLanguageRes: "MENUITEM.CAPTION.OPENAPPLICATIONVIEW",
        titlePSLanguageRes: "PAGE.TITLE.IBIZBOOK.INTERNALFUNCGRIDVIEW",
        showDataInfoBar: false,
        codeName: 'IBIZBOOKInternalFuncGridView',
        uiEngineModel: [
                    {
                        name: 'toolbar_deuiaction1_click',
                        triggerType: 'CTRLEVENT',
                        logicType: 'APPVIEWUIACTION',
                        eventNames: 'CLICK',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: 'deuiaction1',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: 'toolbar',
                        uIActionTag: 'New',
                        entityCodeName: '',
                    },
                    {
                        name: 'toolbar_deuiaction2_click',
                        triggerType: 'CTRLEVENT',
                        logicType: 'APPVIEWUIACTION',
                        eventNames: 'CLICK',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: 'deuiaction2',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: 'toolbar',
                        uIActionTag: 'Edit',
                        entityCodeName: '',
                    },
                    {
                        name: 'toolbar_deuiaction3_click',
                        triggerType: 'CTRLEVENT',
                        logicType: 'APPVIEWUIACTION',
                        eventNames: 'CLICK',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: 'deuiaction3',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: 'toolbar',
                        uIActionTag: 'NewRow',
                        entityCodeName: '',
                    },
                    {
                        name: 'toolbar_deuiaction4_click',
                        triggerType: 'CTRLEVENT',
                        logicType: 'APPVIEWUIACTION',
                        eventNames: 'CLICK',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: 'deuiaction4',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: 'toolbar',
                        uIActionTag: 'ToggleRowEdit',
                        entityCodeName: '',
                    },
                    {
                        name: 'toolbar_deuiaction5_click',
                        triggerType: 'CTRLEVENT',
                        logicType: 'APPVIEWUIACTION',
                        eventNames: 'CLICK',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: 'deuiaction5',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: 'toolbar',
                        uIActionTag: 'SaveRow',
                        entityCodeName: '',
                    },
                    {
                        name: 'newdata',
                        triggerType: 'CUSTOM',
                        logicType: 'SYSUILOGIC',
                        eventNames: '',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: '',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: '',
                        entityCodeName: '',
                    },
                    {
                        name: 'opendata',
                        triggerType: 'CUSTOM',
                        logicType: 'SYSUILOGIC',
                        eventNames: '',
                        scriptCode: ``,
                        logicName:``,
                        logicTag: '',
                        eventArg: '',
                        eventArg2: '',
                        timer: 0,
                        psViewCtrlName: '',
                        entityCodeName: '',
                    }
            ],
        ctrls: [
            {
                name: 'searchform',
                codeName: 'Default',
                controlType: 'SEARCHFORM',
            },
            {
                name: 'quicksearchform',
                codeName: 'QUICKSEARCHFORM',
                controlType: 'SEARCHFORM',
            },
            {
                name: 'toolbar',
                codeName: 'InternalFuncGridViewtoolbar',
                controlType: 'TOOLBAR',
            },
            {
                name: 'grid',
                codeName: 'InternalFunc',
                controlType: 'GRID',
            }
        ],
        ctrlParams: {
            IBIZBOOKsearchform: {},
            IBIZBOOKquicksearchform: {},
            IBIZBOOKtoolbar: {},
            IBIZBOOKgrid: {},
        },
        cssName: "",
        name: "IBIZBOOKInternalFuncGridView",
        viewType: "DEGRIDVIEW",
        viewStyle: "DEFAULT",
        showCaption: false,
        isLoadDefault: true,
        entityCodeName: "IBIZBOOK",
        keyPSAppDEField: "IBIZBOOKId",
        majorPSAppDEField: "IBIZBOOKName",
        enableQuickSearch: true,
        expandSearchForm:false,
        enableQuickGroup: true,
        quickGroupCodeList: "Sample__Bookgroup",
        newData: {
            deCodeName: 'IBIZBOOK',
            newDataViewName: 'IBIZBOOKEditView',
        },
        openData: {
            deCodeName: 'IBIZBOOK',
            openDataViewName: 'IBIZBOOKEditView',
        },
        toolbarItems: [
            {
          		actionLevel: '100',
          		caption: '新建',
          		captionLanResTag: 'TBB.TEXT.*.NEW',
          		name: 'deuiaction1',
          		showCaption: true,
          		tooltip: '新建',
          		tooltipLanResTag: 'TBB.TOOLTIP.*.NEW',
          		itemType: 'DEUIACTION',
          		showIcon: true,
          		disabled: false,
          		cssName: '',
          		imagePath: '',
          		iconCls: 'fa fa-file-text-o',
                  imagePathX: '',
          		dataAccessAction: '',
          		noPrivDisplayMode: 2,
          		uiAction: {
          			codeName: 'New',
          			uIActionMode: 'SYS',
          			actionTarget: '',
          			uIActionTag: 'New',
          			uIActionType: 'DEUIACTION'
          		},
                  logic: {
                  	name: 'toolbar_deuiaction1_click',
                  	actionTag: 'New',
                  	xDataCtrlName: 'grid',
                  	predefinedType: 'EDITVIEW_NEWACTION',
                  }
            },
            {
          		actionLevel: '100',
          		caption: '编辑',
          		captionLanResTag: 'TBB.TEXT.*.EDIT',
          		name: 'deuiaction2',
          		showCaption: true,
          		tooltip: '编辑',
          		tooltipLanResTag: 'TBB.TOOLTIP.*.EDIT',
          		itemType: 'DEUIACTION',
          		showIcon: true,
          		disabled: false,
          		cssName: '',
          		imagePath: '',
          		iconCls: 'fa fa-edit',
                  imagePathX: '',
          		dataAccessAction: '',
          		noPrivDisplayMode: 2,
          		uiAction: {
          			codeName: 'Edit',
          			uIActionMode: 'SYS',
          			actionTarget: 'SINGLEKEY',
          			uIActionTag: 'Edit',
          			uIActionType: 'DEUIACTION'
          		},
                  logic: {
                  	name: 'toolbar_deuiaction2_click',
                  	actionTag: 'Edit',
                  	xDataCtrlName: 'grid',
                  	predefinedType: 'GRIDVIEW_EDITACTION',
                  }
            },
            {
          		actionLevel: '100',
          		caption: '新建行',
          		captionLanResTag: '',
          		name: 'deuiaction3',
          		showCaption: true,
          		tooltip: '新建行',
          		tooltipLanResTag: '',
          		itemType: 'DEUIACTION',
          		showIcon: true,
          		disabled: false,
          		cssName: '',
          		imagePath: '',
          		iconCls: 'fa fa-plus',
                  imagePathX: '',
          		dataAccessAction: '',
          		noPrivDisplayMode: 2,
          		uiAction: {
          			codeName: 'NewRow',
          			uIActionMode: 'SYS',
          			actionTarget: '',
          			uIActionTag: 'NewRow',
          			uIActionType: 'DEUIACTION'
          		},
                  logic: {
                  	name: 'toolbar_deuiaction3_click',
                  	actionTag: 'NewRow',
                  	xDataCtrlName: 'grid',
                  	predefinedType: 'GRIDVIEW_NEWROWACTION',
                  }
            },
            {
          		actionLevel: '100',
          		caption: '行编辑',
          		captionLanResTag: '',
          		name: 'deuiaction4',
          		showCaption: true,
          		tooltip: '行编辑',
          		tooltipLanResTag: '',
          		itemType: 'DEUIACTION',
          		showIcon: true,
          		disabled: false,
          		cssName: '',
          		imagePath: '',
          		iconCls: 'fa fa-table',
                  imagePathX: '',
          		dataAccessAction: '',
          		noPrivDisplayMode: 2,
          		uiAction: {
          			codeName: 'ToggleRowEdit',
          			uIActionMode: 'SYS',
          			actionTarget: '',
          			uIActionTag: 'ToggleRowEdit',
          			uIActionType: 'DEUIACTION'
          		},
                  logic: {
                  	name: 'toolbar_deuiaction4_click',
                  	actionTag: 'ToggleRowEdit',
                  	xDataCtrlName: 'grid',
                  	predefinedType: 'GRIDVIEW_ROWEDITACTION',
                  }
            },
            {
          		actionLevel: '100',
          		caption: '保存行',
          		captionLanResTag: '',
          		name: 'deuiaction5',
          		showCaption: true,
          		tooltip: '保存行',
          		tooltipLanResTag: '',
          		itemType: 'DEUIACTION',
          		showIcon: true,
          		disabled: false,
          		cssName: '',
          		imagePath: '',
          		iconCls: 'fa fa-save',
                  imagePathX: '',
          		dataAccessAction: '',
          		noPrivDisplayMode: 2,
          		uiAction: {
          			codeName: 'SaveRow',
          			uIActionMode: 'SYS',
          			actionTarget: '',
          			uIActionTag: 'SaveRow',
          			uIActionType: 'DEUIACTION'
          		},
                  logic: {
                  	name: 'toolbar_deuiaction5_click',
                  	actionTag: 'SaveRow',
                  	xDataCtrlName: 'grid',
                  	predefinedType: 'GRIDVIEW_SAVEROWACTION',
                  }
            },
        ],
        toolbarLogics: [
            ]     ,
        xDataCtrlName: "grid",
        quickSearchPlaceholder: ['图书名称',].join(","),
        useDefaultLayout: true,
        enableRowEdit: true,
        rowActiveMode: 2,
        rowEditDefault: true,
    }
}

export const model = getModel();